package com.banyuan.lesson.stringdemo;

import java.util.Arrays;

public class Lianxi {
    public static void main(String[] args) {

        //依次打印该字符串的acsii码
        String s = "abcdefghijksdlkjasld";
        char[] c1 = s.toCharArray();
        for (char c : c1) {
            System.out.println(c + 0);
        }

        //将www挖出来
        String s2 = "qeewwwsjdfaksdfakjwdsafw";
        String[] arr1 =  s2.split("www");
        String s3 =  "";
        for (String s1 : arr1) {
            s3 = s1 + s3;
        }
        System.out.println(s3);

        //将某个字符串生序 "hgedcab"

        String s4 = "hgedcab";
        char[] arr2 = s4.toCharArray();
        Arrays.sort(arr2);
        String s5 = String.valueOf(arr2);
        System.out.println(s5);
    }
}
